/* 登录注册页面的背景动效 */
.ai-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* 动态渐变背景 */
.ai-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: gradientMove 20s ease infinite alternate;
    pointer-events: none;
    z-index: 0;
}

/* 背景网格动效 */
.ai-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(#1e293b 1px, transparent 1px),
        linear-gradient(90deg, #1e293b 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
    animation: gridMove 20s linear infinite;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientMove {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(5deg); }
}

/* 登录卡片样式 */
.login-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 800px; /* 修改: 增加最大宽度 */
    margin: auto;
    position: relative;
    padding: 2rem;
    z-index: 2;
}

/* 卡片光晕效果 */
.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    animation: rotateLighting 10s linear infinite;
    pointer-events: none;
}

@keyframes rotateLighting {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 输入框样式 */
.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 3;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 确保输入的文字也是白色 */
.form-control:focus,
.form-control:active,
.form-control {
    color: rgba(255, 255, 255, 0.9) !important;
    caret-color: #fff; /* 光标颜色 */
}

/* 自动填充时的背景和文字颜色 */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
    -webkit-box-shadow: 0 0 0 30px rgba(15, 23, 42, 0.8) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 3;
}

/* 按钮悬浮效果 */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(99, 102, 241, 0.3),
        0 0 0 2px rgba(99, 102, 241, 0.4);
}

/* 粒子效果增强 */
.particle {
    position: absolute;
    background: radial-gradient(circle at center, 
        rgba(99, 102, 241, 0.8) 0%,
        rgba(99, 102, 241, 0.4) 50%,
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(2px);
    animation: float 6s infinite, glow 4s infinite alternate;
}

@keyframes glow {
    0% { filter: blur(2px) brightness(1); }
    100% { filter: blur(4px) brightness(1.5); }
}

/* 标题样式增强 */
.login-card h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.login-card h1 i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* 添加更多动态粒子 */
.particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at center, 
        rgba(99, 102, 241, 0.1) 0%, 
        transparent 50%
    );
    animation: particleWave 10s infinite alternate;
}

@keyframes particleWave {
    0% { transform: scale(1); }
    100% { transform: scale(1.5); }
}

/* 链接样式 */
.text-decoration-none {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
}

.text-decoration-none:hover {
    color: #6366f1;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* 记住我选项样式 */
.form-check-label {
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 3;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* 浮动粒子效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 0.8; }
}



.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
    color: #495057;
    border-color: #dee2e6 #dee2e6 #fff;
    background:none;
}

/* 调整select框样式以匹配input框 */
.form-select {
    background: rgba(255, 255, 255, 0.03); /* 与.form-control背景一致 */
    border: 1px solid rgba(255, 255, 255, 0.1); /* 与.form-control边框一致 */
    border-radius: 12px; /* 与.form-control圆角一致 */
    color: #fff; /* 文字颜色与.form-control一致 */
    padding: 1rem 1.25rem; /* 与.form-control填充一致 */
    transition: all 0.3s ease; /* 与.form-control过渡效果一致 */
    backdrop-filter: blur(5px); /* 与.form-control背景模糊效果一致 */
    position: relative;
    z-index: 3;
}

.form-select:focus {
    background: rgba(255, 255, 255, 0.05); /* 与.form-control聚焦背景一致 */
    border-color: rgba(99, 102, 241, 0.5); /* 与.form-control聚焦边框一致 */
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.1); /* 与.form-control聚焦阴影一致 */
    transform: translateY(-2px); /* 与.form-control聚焦位移一致 */
}

/* 确保tab内容区域不会超出屏幕范围 */
.tab-content {
    max-height: 50vh; /* 限制最大高度 */
    overflow-y: auto; /* 添加滚动条 */
}

/* 增加容器宽度 */
.container {
    max-width: 1000px; /* 调整容器的最大宽度 */
    margin: 0 auto; /* 居中对齐 */
}
